package com.sx.baseproject.module.homePage;

import com.alibaba.android.arouter.facade.annotation.Route
import com.example.mvvm.base.data.DataBindingConfig
import com.example.mvvm.base.vm.BaseViewModel
import com.gyf.immersionbar.ImmersionBar
import com.sx.baseproject.BR
import com.sx.baseproject.R
import com.sx.baseproject.databinding.FragGroupOrderBinding
import com.sx.baseproject.framework.adapter.TestAdapter
import com.sx.baseproject.framework.app.MyFragment
import com.sx.baseproject.framework.arouth.RoutePath
import com.sx.baseproject.framework.model.MainModel
import com.sx.baseproject.module.MainActivity

/**
 * @Description
 * @Author 梁浩文
 * @Date 2021/10/13 16:13
 */
@Route(path = RoutePath.MAIN_GROUP)
class GroupOrderFragment : MyFragment<FragGroupOrderBinding, MainActivity>() {


    private val viewModel: MainModel by lazy {
        getFragmentScopeViewModel(MainModel::class.java)
    }

    override fun initViewModel() {
    }

    override fun getDataBindingConfig(): DataBindingConfig =
        DataBindingConfig(R.layout.frag_group_order, BR.viewModel, viewModel)
            .addBindingParam(BR.adapter, TestAdapter(context, R.layout.item_product))


    override fun initData() {
    }

    override fun initView() {
        ImmersionBar.with(this).titleBar(binding.refresh).statusBarDarkFont(true).init()
    }
}